package dynamic.mybatisplus.core;

import dynamic.ibatis.builder.annotation.DMethodResolver;
import org.apache.ibatis.builder.annotation.MethodResolver;

import java.lang.reflect.Method;

/**
 * 继承 {@link MethodResolver}
 *
 * @author miemie
 * @since 2019-01-05
 */
public class DMybatisMethodResolver extends DMethodResolver {

    private final DMybatisMapperAnnotationBuilder annotationBuilder;
    private final Method method;

    public DMybatisMethodResolver(DMybatisMapperAnnotationBuilder annotationBuilder, Method method) {
        super(null, null);
        this.annotationBuilder = annotationBuilder;
        this.method = method;
    }

    @Override
    public void resolve() {
        annotationBuilder.parseStatement(method);
    }
}
